#include "student.h"
#include <QDebug>


Student::Student(QObject *parent) :
    QObject(parent)
{

}




void Student::treat()
{
    qDebug() << "请老师吃饭";
}

void Student::treat(QString foodName)
{
    //    qDebug() << "请老师吃饭, 老师要吃:" << foodName;

    // QString 转 char *  先转成QByteArray 类型  再转换成 char *
    qDebug() << "请老师吃饭, 老师要吃:" << foodName.toUtf8().data();
}
